package com.daoeping.data;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Usr_user entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usr_user", catalog = "daoeping")
public class Usr_user implements java.io.Serializable {

	// Fields

	private Integer id;
	private String username;
	private String password;
	private String email;
	private Set<Usr_friend> usr_friendsForUserId = new HashSet<Usr_friend>(0);
	private Set<Bzn_questioncomm> bzn_questioncomms = new HashSet<Bzn_questioncomm>(
			0);
	private Set<Bzn_questionfavorite> bzn_questionfavorites = new HashSet<Bzn_questionfavorite>(
			0);
	private Set<Bzn_question> bzn_questions = new HashSet<Bzn_question>(0);
	private Set<Bsc_contact> bsc_contacts = new HashSet<Bsc_contact>(0);
	private Set<Bzn_jobdescription> bzn_jobdescriptions = new HashSet<Bzn_jobdescription>(
			0);
	private Set<Bzn_questionfollow> bzn_questionfollows = new HashSet<Bzn_questionfollow>(
			0);
	private Set<Usr_workexperience> usr_workexperiences = new HashSet<Usr_workexperience>(
			0);
	private Set<Bzn_answer> bzn_answers = new HashSet<Bzn_answer>(0);
	private Set<Cop_companyuser> cop_companyusers = new HashSet<Cop_companyuser>(
			0);
	private Set<Bzn_answercomm> bzn_answercomms = new HashSet<Bzn_answercomm>(0);
	private Set<Usr_friend> usr_friendsForFriendId = new HashSet<Usr_friend>(0);
	private Set<Usr_education> usr_educations = new HashSet<Usr_education>(0);
	private Set<Usr_training> usr_trainings = new HashSet<Usr_training>(0);
	private Set<Usr_userbasicinfo> usr_userbasicinfos = new HashSet<Usr_userbasicinfo>(
			0);
	private Set<Bzn_questionassigned> bzn_questionassigneds = new HashSet<Bzn_questionassigned>(
			0);

	// Constructors

	/** default constructor */
	public Usr_user() {
	}

	/** minimal constructor */
	public Usr_user(String username, String password, String email) {
		this.username = username;
		this.password = password;
		this.email = email;
	}

	/** full constructor */
	public Usr_user(String username, String password, String email,
			Set<Usr_friend> usr_friendsForUserId,
			Set<Bzn_questioncomm> bzn_questioncomms,
			Set<Bzn_questionfavorite> bzn_questionfavorites,
			Set<Bzn_question> bzn_questions, Set<Bsc_contact> bsc_contacts,
			Set<Bzn_jobdescription> bzn_jobdescriptions,
			Set<Bzn_questionfollow> bzn_questionfollows,
			Set<Usr_workexperience> usr_workexperiences,
			Set<Bzn_answer> bzn_answers, Set<Cop_companyuser> cop_companyusers,
			Set<Bzn_answercomm> bzn_answercomms,
			Set<Usr_friend> usr_friendsForFriendId,
			Set<Usr_education> usr_educations, Set<Usr_training> usr_trainings,
			Set<Usr_userbasicinfo> usr_userbasicinfos,
			Set<Bzn_questionassigned> bzn_questionassigneds) {
		this.username = username;
		this.password = password;
		this.email = email;
		this.usr_friendsForUserId = usr_friendsForUserId;
		this.bzn_questioncomms = bzn_questioncomms;
		this.bzn_questionfavorites = bzn_questionfavorites;
		this.bzn_questions = bzn_questions;
		this.bsc_contacts = bsc_contacts;
		this.bzn_jobdescriptions = bzn_jobdescriptions;
		this.bzn_questionfollows = bzn_questionfollows;
		this.usr_workexperiences = usr_workexperiences;
		this.bzn_answers = bzn_answers;
		this.cop_companyusers = cop_companyusers;
		this.bzn_answercomms = bzn_answercomms;
		this.usr_friendsForFriendId = usr_friendsForFriendId;
		this.usr_educations = usr_educations;
		this.usr_trainings = usr_trainings;
		this.usr_userbasicinfos = usr_userbasicinfos;
		this.bzn_questionassigneds = bzn_questionassigneds;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "username", nullable = false, length = 50)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", nullable = false, length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "email", nullable = false, length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_userByUserId")
	public Set<Usr_friend> getUsr_friendsForUserId() {
		return this.usr_friendsForUserId;
	}

	public void setUsr_friendsForUserId(Set<Usr_friend> usr_friendsForUserId) {
		this.usr_friendsForUserId = usr_friendsForUserId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_questioncomm> getBzn_questioncomms() {
		return this.bzn_questioncomms;
	}

	public void setBzn_questioncomms(Set<Bzn_questioncomm> bzn_questioncomms) {
		this.bzn_questioncomms = bzn_questioncomms;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_questionfavorite> getBzn_questionfavorites() {
		return this.bzn_questionfavorites;
	}

	public void setBzn_questionfavorites(
			Set<Bzn_questionfavorite> bzn_questionfavorites) {
		this.bzn_questionfavorites = bzn_questionfavorites;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_question> getBzn_questions() {
		return this.bzn_questions;
	}

	public void setBzn_questions(Set<Bzn_question> bzn_questions) {
		this.bzn_questions = bzn_questions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bsc_contact> getBsc_contacts() {
		return this.bsc_contacts;
	}

	public void setBsc_contacts(Set<Bsc_contact> bsc_contacts) {
		this.bsc_contacts = bsc_contacts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_jobdescription> getBzn_jobdescriptions() {
		return this.bzn_jobdescriptions;
	}

	public void setBzn_jobdescriptions(
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_questionfollow> getBzn_questionfollows() {
		return this.bzn_questionfollows;
	}

	public void setBzn_questionfollows(
			Set<Bzn_questionfollow> bzn_questionfollows) {
		this.bzn_questionfollows = bzn_questionfollows;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Usr_workexperience> getUsr_workexperiences() {
		return this.usr_workexperiences;
	}

	public void setUsr_workexperiences(
			Set<Usr_workexperience> usr_workexperiences) {
		this.usr_workexperiences = usr_workexperiences;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_answer> getBzn_answers() {
		return this.bzn_answers;
	}

	public void setBzn_answers(Set<Bzn_answer> bzn_answers) {
		this.bzn_answers = bzn_answers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Cop_companyuser> getCop_companyusers() {
		return this.cop_companyusers;
	}

	public void setCop_companyusers(Set<Cop_companyuser> cop_companyusers) {
		this.cop_companyusers = cop_companyusers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_answercomm> getBzn_answercomms() {
		return this.bzn_answercomms;
	}

	public void setBzn_answercomms(Set<Bzn_answercomm> bzn_answercomms) {
		this.bzn_answercomms = bzn_answercomms;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_userByFriendId")
	public Set<Usr_friend> getUsr_friendsForFriendId() {
		return this.usr_friendsForFriendId;
	}

	public void setUsr_friendsForFriendId(Set<Usr_friend> usr_friendsForFriendId) {
		this.usr_friendsForFriendId = usr_friendsForFriendId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Usr_education> getUsr_educations() {
		return this.usr_educations;
	}

	public void setUsr_educations(Set<Usr_education> usr_educations) {
		this.usr_educations = usr_educations;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Usr_training> getUsr_trainings() {
		return this.usr_trainings;
	}

	public void setUsr_trainings(Set<Usr_training> usr_trainings) {
		this.usr_trainings = usr_trainings;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Usr_userbasicinfo> getUsr_userbasicinfos() {
		return this.usr_userbasicinfos;
	}

	public void setUsr_userbasicinfos(Set<Usr_userbasicinfo> usr_userbasicinfos) {
		this.usr_userbasicinfos = usr_userbasicinfos;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usr_user")
	public Set<Bzn_questionassigned> getBzn_questionassigneds() {
		return this.bzn_questionassigneds;
	}

	public void setBzn_questionassigneds(
			Set<Bzn_questionassigned> bzn_questionassigneds) {
		this.bzn_questionassigneds = bzn_questionassigneds;
	}

}